package com.rico.gallery;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

import com.alibaba.fastjson.JSON;
import com.rico.gallery.utils.Constant;


public class LaucherActivity extends Activity {

    SharedPreferences sharedPreferences = null;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_laucher);
        sharedPreferences = getSharedPreferences(this.getPackageName(), Context.MODE_PRIVATE);
        String password = sharedPreferences.getString("password", "");
        if(password==null||password.trim().equals("")) {
            SharedPreferences.Editor edit = getSharedPreferences(getPackageName(), Context.MODE_PRIVATE).edit();
            //通过editor对象写入数据
            edit.putString("password","123456");
            //提交数据存入到xml文件中
            edit.commit();
        }
        Intent intent=new Intent(LaucherActivity.this,MainActivity.class);
        startActivity(intent);
    }
}
